package ooday05_homework;

public class StaticDemo {
    public static void main(String[] args) {
        //静态常量演示
        StaticVar s1 = new StaticVar();
        s1.show();
        StaticVar s2 = new StaticVar();
        s2.show();
        StaticVar s3 = new StaticVar();
        s3.show();
        //静态块演示
        StaticBlock staticBlock = new StaticBlock();
        staticBlock.show();
        //静态方法演示
        StaticMethod staticMethod = new StaticMethod();
        staticMethod.show();
        StaticMethod.test();
        System.out.println(StaticMethod.plus(5,6));
        //静态常量
        System.out.println(StaticMethod.num);
        System.out.println(StaticMethod.COUNT);
        //复杂枚举
        Seasons s = Seasons.SUMMER;
        System.out.println(s.getSeasonName());
        System.out.println(s.getSeasonDesc());

        Seasons[] seasons = Seasons.values();
        for (int i = 0; i < seasons.length; i++){
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName());
            System.out.println(seasons[i].getSeasonDesc());
        }
    }
}
